package com.guangyunl.arithmetic;

public class Demo01Arithmetic {
    public static void main(String[] args) {

        int i = 10;
        int j = 3;

        System.out.println("===================");
        System.out.println("加法");
        int add = i + j; //推荐使用
        System.out.println("add = " + add); //推荐使用  add = 13
        System.out.println("add = " + (i + j)); // add = 13

        System.out.println("===================");

        System.out.println("减法");
        int sub = i - j;
        System.out.println("sub = " + sub); // sub = 7

        System.out.println("===================");

        System.out.println("乘法");
        int mul = i * j;
        System.out.println("mul = " + mul); // mul = 30

        System.out.println("===================");

        System.out.println("除法");
        int div = i / j;
        System.out.println("div = " + div); // div = 3

        System.out.println("===================");

        System.out.println("模/取余");
        int rem = i % j;
        System.out.println("rem = " + rem); // rem = 1

        System.out.println("===================");


    }
}
